﻿@page "/gatewayruntime/devicestatus"
@using System.Linq.Expressions;
@using BlazorComponent;
@using Masa.Blazor.Presets;
@using Microsoft.AspNetCore.Authorization;
@using Microsoft.Extensions.DependencyInjection
@using SqlSugar
@using ThingsGateway.Admin.Application;
@using ThingsGateway.Admin.Blazor
@using ThingsGateway.Core.Extension
@using ThingsGateway.Gateway.Application

@namespace ThingsGateway.Gateway.Blazor
@attribute [Authorize]
@inject UserResoures UserResoures
@attribute [RolePermission]
@inherits BaseComponentBase
@inject NavigationManager NavigationManager

<MCard Rounded=true Elevation=1 Class="ma-2">
    <MTabs @bind-Value="tab" Class="" Style="">
        <MTab Value=1>    @AppService.I18n.T("采集设备状态")    </MTab>
        <MTab Value=2>    @AppService.I18n.T("业务设备状态")    </MTab>
    </MTabs>
    <MTabsItems Value="tab">
        <MTabItem Value="1">
            @if (tab == 1)
            {
                <DeviceStatus Channels=Channels Devices=Devices PluginOutputs=PluginOutputs DeviceQuery="CollectDeviceQuery" DeviceWorker="CollectDeviceWorker" DriverBases="CollectBases"></DeviceStatus>
            }

        </MTabItem>
        <MTabItem Value="2">
            @if (tab == 2)
            {

                <DeviceStatus Channels=Channels Devices=Devices PluginOutputs=PluginOutputs DeviceQuery="BusinessDeviceQuery" DeviceWorker="BusinessDeviceWorker" DriverBases="BusinessBases"></DeviceStatus>
            }

        </MTabItem>

    </MTabsItems>
</MCard>



@code {

    private StringNumber tab;
}

